﻿#ifndef TCPCCLIENTFORMVB_H
#define TCPCCLIENTFORMVB_H

#include"tcpclientbase.h"
#include"dataCache/mvbprotocalcache.h"
class tcpcClientForMVB:public TCPClientBase
{
    Q_OBJECT
    enum MsgType
    {
        FILE_INFO=0,
        FILE_DATA,
        DATA,
        COMMAND,
        SERVER_REPLY,
        INIT_MVB,
        INIT_TRDP,
        MVB_DATA,
        MVB_WRITE,
        MVB_WRITE_REPLY,
        MVB_READ,
        MVB_READ_REPLY,
        SET_MASTER,
        RESET_ALL_PORTS

    };
public:
    tcpcClientForMVB();
    void snedReadMVBDataCommand();
    void setMaster(bool bMaster);
    void sendWriteMVBDataCommand(const mvbDeviceData& deviceData);
    void commandResetAllPorts();
signals:
    void TransReadMVBData(QByteArray& receiveData);

public slots:
    void dataReceived() override;

protected:
    QByteArray m_readData;
};

#endif // TCPCCLIENTFORMVB_H
